﻿<UserControl     
    x:Class="SilverLight.Training.MainPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:sdk="http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk"
    xmlns:nav="clr-namespace:Navigation.Silverlight;assembly=Navigation.Silverlight"
    xmlns:sl="clr-namespace:SilverLight.Training"    
    mc:Ignorable="d"
    d:DesignHeight="800" d:DesignWidth="900">

    <ScrollViewer
        VerticalScrollBarVisibility="Auto"
        HorizontalScrollBarVisibility="Auto"
        >        
        <Grid>
            <Grid.Background>
                <ImageBrush ImageSource="Images/Background.jpg" />
            </Grid.Background>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="*" />
                <ColumnDefinition Width="770" />
                <ColumnDefinition Width="*" />
            </Grid.ColumnDefinitions>       
            <Grid.RowDefinitions>
                <RowDefinition Height="100"/>
                <RowDefinition Height="500"/>
                <RowDefinition Height="100"/>
            </Grid.RowDefinitions>
        
            <sl:Header Grid.Row="0" Grid.Column="1"/>
            <Grid 
                Grid.Row="1" Grid.Column="1" Background="Azure">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="170" />
                    <ColumnDefinition MinWidth="600" />
                </Grid.ColumnDefinitions>
            
                <Border Grid.Column="0" BorderBrush="Blue" BorderThickness="2"/>
                <sl:Menu Grid.Column="0" Margin="2" />
            
                <Border Grid.Column="1" BorderBrush="Blue" BorderThickness="2"/>
                <nav:SingleItemFrame 
                    Grid.Column="1"
                    Margin="2"
                    x:Name="ContentHolder"
                    DefaultPage="/HomePage.xaml"
                    />
            </Grid>
        </Grid>
    </ScrollViewer>
    <!--<StackPanel x:Name="LayoutRoot" Background="White" Orientation="Vertical">
        <sdk:DataGrid
            x:Name="dtg" 
            AutoGenerateColumns="False"
            ItemsSource="{Binding EmployeeCollection, Mode=TwoWay}"
        >
            <sdk:DataGrid.Columns>
                <sdk:DataGridTextColumn
                    Header="ID" 
                    Binding="{Binding Path=ID, Mode=TwoWay}"
                />
                <sdk:DataGridTextColumn
                    Header="Name"
                    Binding="{Binding Path=Name, Mode=TwoWay}"
                />
                <sdk:DataGridTextColumn 
                    Header="Job Title" 
                    Binding="{Binding Path=JobTitle.TitleName, Mode=TwoWay}"
                />
                <sdk:DataGridTextColumn 
                    Header="Department" 
                    Binding="{Binding Path=Department.DeptName, Mode=TwoWay}"
                />
                <sdk:DataGridTextColumn 
                    Header="Employee Type" 
                    Binding="{Binding Path=EmployeeType.TypeName, Mode=TwoWay}"
                />
            </sdk:DataGrid.Columns>
        </sdk:DataGrid>
        <StackPanel 
            x:Name="sp"
            Orientation="Vertical"
            DataContext="{Binding Path=Employee, Mode=TwoWay}">
            <TextBlock Text="ID"/>
            <TextBox Text="{Binding Path=ID}" />
            <TextBlock Text="Name"/>
            <TextBox Text="{Binding Path=Name}" />
            <TextBlock Text="Description"/>
            <TextBox Text="{Binding Path=Description}" />
            <TextBlock Text="JobTitle"/>
            <TextBox Text="{Binding Path=JobTitle.TitleName}" />
            <TextBlock Text="Department"/>
            <TextBox Text="{Binding Path=Department.DeptName}" />
            <TextBlock Text="EmployeeType"/>
            <TextBox Text="{Binding Path=EmployeeType.TypeName}" />
        </StackPanel>
    </StackPanel>-->
</UserControl>
